﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Runtime.Serialization;

namespace DnnDash.SimplePhoneApp.Model
{
    public interface INavigationService
    {
        void GoToMain();
        void GoToSettings();
        void GoToAbout();
    }
    
    [DataContract]
    [KnownType(typeof(Navigator))]
    public class Navigator : INavigationService
    {
        private System.Windows.Navigation.NavigationService _navigationService;
        
        public Navigator(System.Windows.Navigation.NavigationService navigationService)
        {
            _navigationService = navigationService;
        }
        
        public void GoToMain()
        {
            _navigationService.Navigate(new Uri("/Main.xaml", UriKind.Relative));
        }
        
        public void GoToSettings()
        {
            _navigationService.Navigate(new Uri("/SettingsPage.xaml", UriKind.Relative));
        }
        
        public void GoToAbout()
        {
            _navigationService.Navigate(new Uri("/About.xaml", UriKind.Relative));
        }
    }
}
